﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO;
using IPMsgExpections;
using CommonUtility;

namespace MessageCenter
{
    public class MessageRecvMsg : MessageModel
    {
        internal MessageRecvMsg(uint version, uint indexPack, string userName, string hostName, uint commondWord, string attachMessages)
            : base(version, indexPack, userName, hostName, attachMessages)
        {
            this.CommandWords = commondWord;
        }

        /// <summary>
        /// 构造函数，回复确认收到对方的消息
        /// </summary>
        /// <param name="userName">本机用户名</param>
        /// <param name="hostName">本机主机名</param>
        /// <param name="indexPackage">获取本机当前发送包序号</param>
        /// <param name="whichPackageHasBeenReceived">回复收到了对方消息的包序号</param>
        public MessageRecvMsg(string userName, string hostName, uint indexPackage, uint whichPackageHasBeenReceived)
            : base(userName, hostName, indexPackage)
        {
            base.CommandWords = ConstWords.CommonCommand.IPMSG_RECVMSG;
            base.AttachMessages = whichPackageHasBeenReceived.ToString();
        }
    }
}
